Integrand size = 27, antiderivative size = 45 \[ \int \frac {1-i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=-\frac {2 i \text {arctanh}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )}{\sqrt {a+i b} d} \]
Time = 0.48 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.00 \[ \int \frac {1-i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=-\frac {2 i \text {arctanh}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )}{\sqrt {a+i b} d} \]
Time = 0.25 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.78, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3042, 4020, 25, 73, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {1-i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1+i \tan \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {a-b \tan \left (c+d x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 4020 |
\(\displaystyle \frac {i \int -\frac {1}{(i \cot (c+d x)+1) \sqrt {a+b \cot (c+d x)}}d(-i \cot (c+d x))}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {i \int \frac {1}{(i \cot (c+d x)+1) \sqrt {a+b \cot (c+d x)}}d(-i \cot (c+d x))}{d}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle -\frac {2 \int \frac {1}{-\frac {i \cot ^2(c+d x)}{b}-\frac {i a}{b}+1}d\sqrt {a+b \cot (c+d x)}}{b d}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle -\frac {2 \arctan \left (\frac {\cot (c+d x)}{\sqrt {a+i b}}\right )}{d \sqrt {a+i b}}\) |
3.1.91.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ {p = Denominator[m]}, Simp[p/b Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL inearQ[a, b, c, d, m, n, x]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[c*(d/f) Subst[Int[(a + (b/d)*x)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[ b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 738 vs. \(2 (36 ) = 72\).
Time = 0.08 (sec) , antiderivative size = 739, normalized size of antiderivative = 16.42
method | result | size |
derivativedivides | \(\frac {\frac {-\frac {\left (-2 i \sqrt {a^{2}+b^{2}}\, a^{2}-i \sqrt {a^{2}+b^{2}}\, b^{2}-2 i a^{3}-2 i a \,b^{2}-\sqrt {a^{2}+b^{2}}\, a b -a^{2} b -b^{3}\right ) \ln \left (\sqrt {a +b \cot \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \cot \left (d x +c \right )-\sqrt {a^{2}+b^{2}}-a \right )}{2}+\frac {2 \left (i \sqrt {a^{2}+b^{2}}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+i \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{3}+i \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a \,b^{2}+\sqrt {a^{2}+b^{2}}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a b +\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2} b +\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{3}+\frac {\left (-2 i \sqrt {a^{2}+b^{2}}\, a^{2}-i \sqrt {a^{2}+b^{2}}\, b^{2}-2 i a^{3}-2 i a \,b^{2}-\sqrt {a^{2}+b^{2}}\, a b -a^{2} b -b^{3}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{2}\right ) \arctan \left (\frac {-2 \sqrt {a +b \cot \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, \left (\sqrt {a^{2}+b^{2}}\, a +a^{2}+b^{2}\right )}+\frac {\frac {\left (-i \sqrt {a^{2}+b^{2}}-i a -b \right ) \ln \left (b \cot \left (d x +c \right )+a +\sqrt {a +b \cot \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (-i \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b -\frac {\left (-i \sqrt {a^{2}+b^{2}}-i a -b \right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{2}\right ) \arctan \left (\frac {2 \sqrt {a +b \cot \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}}}{d}\) | \(739\) |
default | \(\frac {\frac {-\frac {\left (-2 i \sqrt {a^{2}+b^{2}}\, a^{2}-i \sqrt {a^{2}+b^{2}}\, b^{2}-2 i a^{3}-2 i a \,b^{2}-\sqrt {a^{2}+b^{2}}\, a b -a^{2} b -b^{3}\right ) \ln \left (\sqrt {a +b \cot \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \cot \left (d x +c \right )-\sqrt {a^{2}+b^{2}}-a \right )}{2}+\frac {2 \left (i \sqrt {a^{2}+b^{2}}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2}+i \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{3}+i \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a \,b^{2}+\sqrt {a^{2}+b^{2}}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a b +\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a^{2} b +\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b^{3}+\frac {\left (-2 i \sqrt {a^{2}+b^{2}}\, a^{2}-i \sqrt {a^{2}+b^{2}}\, b^{2}-2 i a^{3}-2 i a \,b^{2}-\sqrt {a^{2}+b^{2}}\, a b -a^{2} b -b^{3}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{2}\right ) \arctan \left (\frac {-2 \sqrt {a +b \cot \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, \left (\sqrt {a^{2}+b^{2}}\, a +a^{2}+b^{2}\right )}+\frac {\frac {\left (-i \sqrt {a^{2}+b^{2}}-i a -b \right ) \ln \left (b \cot \left (d x +c \right )+a +\sqrt {a +b \cot \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{2}+\frac {2 \left (-i \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a -\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, b -\frac {\left (-i \sqrt {a^{2}+b^{2}}-i a -b \right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{2}\right ) \arctan \left (\frac {2 \sqrt {a +b \cot \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}}{\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}}}{d}\) | \(739\) |
parts | \(\text {Expression too large to display}\) | \(1888\) |
1/d*(1/(2*(a^2+b^2)^(1/2)+2*a)^(1/2)/(a^2+b^2)^(1/2)/((a^2+b^2)^(1/2)*a+a^ 2+b^2)*(-1/2*(-2*I*(a^2+b^2)^(1/2)*a^2-I*(a^2+b^2)^(1/2)*b^2-2*I*a^3-2*I*a *b^2-(a^2+b^2)^(1/2)*a*b-a^2*b-b^3)*ln((a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2) ^(1/2)+2*a)^(1/2)-b*cot(d*x+c)-(a^2+b^2)^(1/2)-a)+2*(I*(2*(a^2+b^2)^(1/2)+ 2*a)^(1/2)*(a^2+b^2)^(1/2)*a^2+I*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^3+I*(2*(a ^2+b^2)^(1/2)+2*a)^(1/2)*a*b^2+(a^2+b^2)^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/ 2)*a*b+(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^2*b+(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*b ^3+1/2*(-2*I*(a^2+b^2)^(1/2)*a^2-I*(a^2+b^2)^(1/2)*b^2-2*I*a^3-2*I*a*b^2-( a^2+b^2)^(1/2)*a*b-a^2*b-b^3)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^ (1/2)-2*a)^(1/2)*arctan((-2*(a+b*cot(d*x+c))^(1/2)+(2*(a^2+b^2)^(1/2)+2*a) ^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)))+1/(2*(a^2+b^2)^(1/2)+2*a)^(1/2)/(a ^2+b^2)^(1/2)*(1/2*(-I*(a^2+b^2)^(1/2)-I*a-b)*ln(b*cot(d*x+c)+a+(a+b*cot(d *x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))+2*(-I*(2*(a^2+ b^2)^(1/2)+2*a)^(1/2)*a-(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*b-1/2*(-I*(a^2+b^2)^ (1/2)-I*a-b)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)* arctan((2*(a+b*cot(d*x+c))^(1/2)+(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^ 2)^(1/2)-2*a)^(1/2))))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 159 vs. \(2 (33) = 66\).
Time = 0.28 (sec) , antiderivative size = 159, normalized size of antiderivative = 3.53 \[ \int \frac {1-i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=\frac {1}{2} \, \sqrt {\frac {4 i}{{\left (-i \, a + b\right )} d^{2}}} \log \left (\frac {1}{2} \, {\left (i \, a - b\right )} d \sqrt {\frac {4 i}{{\left (-i \, a + b\right )} d^{2}}} + \sqrt {\frac {{\left (a + i \, b\right )} e^{\left (2 i \, d x + 2 i \, c\right )} - a + i \, b}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right ) - \frac {1}{2} \, \sqrt {\frac {4 i}{{\left (-i \, a + b\right )} d^{2}}} \log \left (\frac {1}{2} \, {\left (-i \, a + b\right )} d \sqrt {\frac {4 i}{{\left (-i \, a + b\right )} d^{2}}} + \sqrt {\frac {{\left (a + i \, b\right )} e^{\left (2 i \, d x + 2 i \, c\right )} - a + i \, b}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right ) \]
1/2*sqrt(4*I/((-I*a + b)*d^2))*log(1/2*(I*a - b)*d*sqrt(4*I/((-I*a + b)*d^ 2)) + sqrt(((a + I*b)*e^(2*I*d*x + 2*I*c) - a + I*b)/(e^(2*I*d*x + 2*I*c) - 1))) - 1/2*sqrt(4*I/((-I*a + b)*d^2))*log(1/2*(-I*a + b)*d*sqrt(4*I/((-I *a + b)*d^2)) + sqrt(((a + I*b)*e^(2*I*d*x + 2*I*c) - a + I*b)/(e^(2*I*d*x + 2*I*c) - 1)))
\[ \int \frac {1-i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=- i \left (\int \frac {i}{\sqrt {a + b \cot {\left (c + d x \right )}}}\, dx + \int \frac {\cot {\left (c + d x \right )}}{\sqrt {a + b \cot {\left (c + d x \right )}}}\, dx\right ) \]
-I*(Integral(I/sqrt(a + b*cot(c + d*x)), x) + Integral(cot(c + d*x)/sqrt(a + b*cot(c + d*x)), x))
\[ \int \frac {1-i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=\int { \frac {-i \, \cot \left (d x + c\right ) + 1}{\sqrt {b \cot \left (d x + c\right ) + a}} \,d x } \]
\[ \int \frac {1-i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=\int { \frac {-i \, \cot \left (d x + c\right ) + 1}{\sqrt {b \cot \left (d x + c\right ) + a}} \,d x } \]
Time = 14.07 (sec) , antiderivative size = 1410, normalized size of antiderivative = 31.33 \[ \int \frac {1-i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=\text {Too large to display} \]
(log(d*(-1/(d^2*(a - b*1i)))^(1/2)*(a + b*cot(c + d*x))^(1/2)*1i + 1)*(-1/ (a*d^2 - b*d^2*1i))^(1/2))/2 - log(d*(-1/(d^2*(a - b*1i)))^(1/2)*(a + b*co t(c + d*x))^(1/2) + 1i)*(-1/(4*(a*d^2 - b*d^2*1i)))^(1/2) + (log(16*b^3*d* (-1/(d^2*(a - b*1i)))^(1/2) - 16*b^2*(a + b*cot(c + d*x))^(1/2) + (16*a*b^ 2*(a + b*cot(c + d*x))^(1/2))/(a - b*1i))*(-1/(a*d^2 - b*d^2*1i))^(1/2))/2 - log(16*b^2*(a + b*cot(c + d*x))^(1/2) + 16*b^3*d*(-1/(d^2*(a - b*1i)))^ (1/2) - (16*a*b^2*(a + b*cot(c + d*x))^(1/2))/(a - b*1i))*(-1/(4*(a*d^2 - b*d^2*1i)))^(1/2) - 2*atanh((32*b^2*(a + b*cot(c + d*x))^(1/2)*((b*1i)/(4* a^2*d^2 + 4*b^2*d^2) - a/(4*a^2*d^2 + 4*b^2*d^2))^(1/2))/((b^4*d^2*64i)/(4 *a^2*d^3 + 4*b^2*d^3) - (64*a*b^3*d^2)/(4*a^2*d^3 + 4*b^2*d^3)) + (a*b^3*( a + b*cot(c + d*x))^(1/2)*((b*1i)/(4*a^2*d^2 + 4*b^2*d^2) - a/(4*a^2*d^2 + 4*b^2*d^2))^(1/2)*128i)/((b^6*d^2*256i)/(4*a^2*d^3 + 4*b^2*d^3) + (a^2*b^ 4*d^2*256i)/(4*a^2*d^3 + 4*b^2*d^3) - (256*a^3*b^3*d^2)/(4*a^2*d^3 + 4*b^2 *d^3) - (256*a*b^5*d^2)/(4*a^2*d^3 + 4*b^2*d^3)) - (128*a^2*b^2*(a + b*cot (c + d*x))^(1/2)*((b*1i)/(4*a^2*d^2 + 4*b^2*d^2) - a/(4*a^2*d^2 + 4*b^2*d^ 2))^(1/2))/((b^6*d^2*256i)/(4*a^2*d^3 + 4*b^2*d^3) + (a^2*b^4*d^2*256i)/(4 *a^2*d^3 + 4*b^2*d^3) - (256*a^3*b^3*d^2)/(4*a^2*d^3 + 4*b^2*d^3) - (256*a *b^5*d^2)/(4*a^2*d^3 + 4*b^2*d^3)))*(-(a - b*1i)/(4*a^2*d^2 + 4*b^2*d^2))^ (1/2) + 2*atanh((32*b^2*(a + b*cot(c + d*x))^(1/2)*((b*1i)/(4*a^2*d^2 + 4* b^2*d^2) - a/(4*a^2*d^2 + 4*b^2*d^2))^(1/2))/((a^2*b^2*d^2*64i)/(4*a^2*...